-- GENERATED SPELL FOR [Necrolord X'avius] --


function spell0_27826(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20298,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27826', 3000, 1)
end

function spell1_27826(pUnit, Event) --@Shadowflame,Self--
pUnit:FullCastSpellOnTarget(51337,pUnit)
pUnit:RegisterEvent('Sorts_27826', 0, 1)
end

function Sorts_27826(pUnit, Event)
local choix_sorts_27826 = math.random(0, 1)
if choix_sorts_27826 == 0 then
pUnit:RegisterEvent('spell0_27826', 1, 1)
end
if choix_sorts_27826 == 1 then
pUnit:RegisterEvent('spell1_27826', 1, 1)
end
end

function mob27826_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27826', math.random(1500, 3000), 1)
end

function mob27826_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27826_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27826_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27826, 1, 'mob27826_Action')
RegisterUnitEvent(27826, 2, 'mob27826_Leave')
RegisterUnitEvent(27826, 3, 'mob27826_Kill')
RegisterUnitEvent(27826, 4, 'mob27826_Die')
